import request from '@/utils/request'

export function getDepartmentInfo() {
  return request({
    url: '/company/department'
  })
}
export function addDepartmentInfo(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
/**
 * 获取部门负责人列表
 */
export function getManagerList() {
  return request({
    url: '/sys/user/simple'
  })
}


/**
 * 获取部门详情
 *
 * ***/

 export function getDepartmentDetail(id) {
  return request({
    url: `/company/department/${id}`
  })
}


/**
 * 更新部门
 */
export function updateManager(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })

}

/**
 * 
 * 删除部门
 *  */ 
export function delDeparment(id){
   return request({
     method:'delete',
     url:`/company/department/${id}`
   })
}